<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>三角形案例</title>
    <style>
        .box{
            width: 100px;
            height:50px;
            line-height:50px;
            /* text-align: center; */
            text-indent:20px;
            background: lightblue;
            color: white;
        }
        span{
            height: 0;
            width: 0; 
            display: inline-block;
            border: 5px solid transparent;
            border-top: 5px solid black;
            position: relative;
            top: 2.5px;
        }
        .box:hover span{
            border: 5px solid transparent;
            border-bottom: 5px solid black;   
            top: -2.5px;    
        }
        
    </style>
</head>
<body>
    <div class="box">
        导航
        <span></span>
    </div>
</body>
</html>